forked from nixpanic/mutt-ldap
-
Notifications
You must be signed in to change notification settings - Fork 6
add config option for an authorization file #7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
wberrier
wants to merge
20
commits into
wking:master
Choose a base branch
from
wberrier:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
in case the credentials should be loaded from an external file My particular use case is that I want to version control the .cfg file, but I don't want to put my username/password in the file
Mostly in regards to unicode string handling. Ldap search results returns "keys" in utf-8, but values are often in bytes. stringify values after querying so that results and cache aren't treated differently. Open files in text mode instead of binary mode. SafeConfigParser was renamed to ConfigParser in python3. LOG.warn is deprecated, change to "LOG.warning" to avoid deprecation output messages.
... such as pass from the passwordstore
[0]: http://www.mutt.org/doc/manual/manual-4.html#ss4.5 [1]: http://www.mutt.org/ [2]: http://en.wikipedia.org/wiki/Lightweight_Directory_Access_Protocol [3]: http://www.python-ldap.org/ [4]: http://www.gentoo.org/ [5]: http://layman.sourceforge.net/ [6]: http://blog.tremily.us/posts/Gentoo_overlay/ [7]: http://www.debian.org/ [8]: http://freedesktop.org/wiki/Software/pyxdg [9]: http://git-scm.com/ [10]: http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html [11]: http://www.gnu.org/licenses/gpl.html [12]: https://github.com/wking/mutt-ldap [13]: https://github.com/wking/mutt-ldap/issues [14]: http://www.mutt.org/doc/manual/manual-4.html#ss4.5 [15]: http://www.mutt.org/ [16]: http://en.wikipedia.org/wiki/Lightweight_Directory_Access_Protocol [17]: http://www.python-ldap.org/ [18]: http://www.gentoo.org/ [19]: http://layman.sourceforge.net/ [20]: http://blog.tremily.us/posts/Gentoo_overlay/ [21]: http://www.debian.org/ [22]: http://freedesktop.org/wiki/Software/pyxdg [23]: http://git-scm.com/ [24]: http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html [25]: http://www.gnu.org/licenses/gpl.html [26]: https://github.com/wking/mutt-ldap [27]: https://github.com/wking/mutt-ldap/issues [28]: https://bugs.freedesktop.org/show_bug.cgi?id=26458 [29]: http://bugs.python.org/issue13329#msg147475 [30]: http://www.mutt.org/doc/manual/manual-4.html#ss4.5 [31]: https://github.com/wberrier/mutt-ldap
unfortunately the ldap module still seems to depend on C source as shows the
error message
gcc -pthread -Wsign-compare -DNDEBUG -fmessage-length=0 -grecord-gcc-switches -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -g -DOPENSSL_LOAD_CONF -fwrapv -fno-semantic-interposition -fmessage-length=0 -grecord-gcc-switches -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -g -IVendor/ -fmessage-length=0 -grecord-gcc-switches -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -g -IVendor/ -fPIC -DHAVE_SASL -DHAVE_TLS -DLDAPMODULE_VERSION=3.4.4 "-DLDAPMODULE_AUTHOR=python-ldap project" "-DLDAPMODULE_LICENSE=Python style" -IModules -I/usr/include/python3.11 -c Modules/LDAPObject.c -o build/temp.linux-x86_64-cpython-311/Modules/LDAPObject.o
In file included from Modules/LDAPObject.c:3:0:
Modules/common.h:9:10: fatal error: Python.h: File o directory non esistente
^~~~~~~~~~
compilation terminated.
error: command '/usr/bin/gcc' failed with exit code 1
allow setting password by passing command
Missing config keys, unsafe LDAP filters, and bad XDG paths broke runs. Add get() fallbacks; escape filter chars; limit attrs; decode safely. Create XDG config/cache dirs; use simple_bind_s; handle unbind. Return only addresses for mutt; set stdout encoding; log errors.
Packaging was outdated; setup.py blocked modern PEP 517 builds. Add pyproject.toml with metadata; remove setup.py; define script.
Co-authored-by: Copilot <[email protected]>
document command
no C dependencies any more by using ldap3 and installable by pipx/ uv tool
fix repo address and bump version
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
in case the credentials should be loaded from an external file
My particular use case is that I want to version control the .cfg
file, but I don't want to put my username/password in the file